<script setup>import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { QQLogin } from '../api/user';
import Card from '../components/Card.vue';
import router from '../router/router';
const isFail = ref(false)
const roueter = useRouter()
if(QC.Login.check()){
    QC.Login.getMe((openId, accessToken)=>{
        console.log(openId, accessToken);
        QQLogin({openId,accessToken})
        .then(res=>{
            router.push(res.data?"/user/infoupdate":"/mine")
        }).catch(res=>{
            router.push("/login")
        })
    })
}
</script>

<template>
    <Card :padding="30" style="display: flex;justify-content: center;align-items: center;height: 100%;">
        <van-loading size="40" text-size="25" >登陆中...</van-loading>
    </Card>
</template>

<style scoped>

</style>